package cn.share.life.common.sensitiveword.dal;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 敏感词(SensitiveWords)表实体类
 *
 * @author cxj
 * @since 2025-02-19 10:59:36
 */
@Schema(description = "敏感词")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("SENSITIVE_WORDS")
public class SensitiveWords {
    //主键
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "主键")
    private String id;
    //敏感词名称
    @Schema(description = "敏感词名称")
    private String name;
    //敏感词类型ID
    @Schema(description = "敏感词类型ID")
    private String typeId;
    //出现次数
    @Schema(description = "出现次数")
    private Long num;
    //创建人ID
    @Schema(description = "创建人ID")
    @TableField(fill = FieldFill.INSERT)
    private String createBy;
    //创建时间
    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    //更新人ID
    @Schema(description = "更新人ID")
    @TableField(fill = FieldFill.UPDATE)
    private String updateBy;
    //更新时间
    @Schema(description = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;
    //删除标记（0=存在；2=代表删除）
    @Schema(description = "删除标记（0=存在；2=代表删除）")
    @TableLogic(value = "0", delval = "2")
    private String delFlag;
    @Schema(description = "敏感词类型")
    @TableField(exist = false)
    private String typeName;

    @Schema(description = "开始时间")
    @TableField(exist = false)
    private String startTime;

    @Schema(description = "结束时间")
    @TableField(exist = false)
    private String endTime;

    @Schema(description = "创建人姓名")
    @TableField(exist = false)
    private String createByName;
}
